package com.ego.portal.controller;

import com.ego.commons.pojo.BigAd;
import com.ego.portal.service.PortalService;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
import java.util.List;

@Controller
public class PortalController {

    @Autowired
    private PortalService portalService;

    @RequestMapping("/")
    public String index(Model model){

        String bigAds = portalService.selectBigAd();
        System.out.println("bigAds = " + bigAds);
        model.addAttribute("ad1",bigAds);

        return "index";
    }
}
